#include<iostream>  
using namespace std;
int main() {
	int i, a[20], n, t;
	a[1] = 1;
	a[2] = 1;
	for (i = 3; i <= 20; i++)
		a[i] = a[i - 2] + a[i - 1];

	cin >> n;
	while (n--) {
		cin >> t;
		cout << a[t] << endl;
	}
	return 0;
}
